<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

</head>
<body>
<h1>jquery快递费用计算，一公斤10元</h1>
<p><input type="text" name="kg" id="kg">公斤</p>
<p>运费：<span></span>元</p>
</body>
<script src="//code.jquery.com/jquery-3.2.1.min.js"></script>
<script>

    $('input').keyup(function(){
        const price = 10 * parseInt(this.value);
        $('span').html(price);
    })


</script>
</html>
